<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        p{
            text-align: center;
        }
        span{
            color: red;
        }
    </style>
</head>
<body>
    <p>
        {{ text }}<span id="time">3</span>秒之后，自动跳转到首页
    </p>
</body>

<script>
    var time = document.getElementById('time')
    var number = 3;
    function showTime() {
         number--;
         if(number==0){
             location.href = "/student"
         }
        time.innerHTML = number;
    }
    setInterval(showTime,1000);
</script>

</html>